$(function () {
    findAll();
});

function findAll() {
    let data = myAjax("/home", {}, "get");

    setNewsModel(data.newsModelList);
}

function setNewsModel(data) {
    let html = "";
    for (let i = 0; i < data.length; i++) {
        html += '<div>\n' +
            '                        <div>' + data[i].title + '</div>\n' +
            '                        <div>' + data[i].content + '</div>' +
            '</div>';
    }
    $("#newsList").html(html);
}